﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bussiness
{
    /// <summary>
    /// 班别类
    /// </summary>
    public class BClass
    {
        /// <summary>
        /// 班别编号
        /// </summary>
        public string BBID { get; set; }
        /// <summary>
        /// 班别描述
        /// </summary>
        public string BBDescription { get; set; }
        /// <summary>
        /// 返回班别结果集
        /// </summary>
        /// <returns></returns>
        public System.Data.DataTable GetBB()
        {
            string sql = "SELECT * FROM T_SYS_BB";
            DB2Provider.DataLink link = new DB2Provider.DataLink();
            System.Data.DataTable dt = link.ExcuteRetureTable(sql);
            return dt;
        }
        /// <summary>
        /// 返回班别描述
        /// </summary>
        /// <returns></returns>
        public string GetBBDescription()
        {
            if (BBDescription == "")
                return "";
            string sql = "SELECT * FROM T_SYS_BB WHERE BBDESC='"+BBDescription+"'";
            DB2Provider.DataLink link = new DB2Provider.DataLink();
            System.Data.DataTable dt = link.ExcuteRetureTable(sql);
            return BBDescription;
        }


    }
}
